
from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token

from users import views

urlpatterns = [
    url(r'^username/(?P<username>.{6,15})$', views.UserNameView.as_view()),
    url(r'^mobile/(?P<mobile>1[3-9]\d{9})$', views.UserMobileView.as_view()),
    url(r'^authorizations/$', obtain_jwt_token),
    url(r'^sms_code/(?P<mobile>1[3-9]\d{9})$', views.SMSCodeView.as_view()),
    url(r'^users/$', views.UserView.as_view()),
    url(r'^usercard/$', views.UserDetailView.as_view()),
    url(r'^city/$', views.UserCityViewSet.as_view()),
    url(r'school/$', views.UserSchool.as_view()),
    url(r'user/information/$', views.UserDetailView.as_view()),
    url(r'company/$', views.UserCompany.as_view()),
    url(r'website/$', views.UserWeb.as_view()),
    url(r'intro/$', views.UserIntro.as_view()),
    url(r'avatar/$', views.UserAvatar.as_view()),
    url(r'archives/$', views.UserArchives.as_view()),
    url(r'answer/$', views.MyQuestions.as_view()),
    url(r'myanswers/$', views.MyAnswers.as_view()),
    url(r'userpwd/$', views.USerPWDView.as_view()),
]


from rest_framework import routers

router = routers.SimpleRouter()
router.register(r'userdatas', views.UserDataView, base_name='userdata')

urlpatterns += router.urls
